package com.hdax.ssm.service.impl;

import com.hdax.ssm.dao.UserRoleDao;
import com.hdax.ssm.service.UserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserRoleServiceImpl implements UserRoleService {
    @Autowired
    private UserRoleDao userRoleDao;
    @Override
    public long getRoleByUserId(long userId) {
        return userRoleDao.getRoleByUserId(userId);
    }

    @Override
    public boolean updateUserRole(long userId, long roleId) {
        return userRoleDao.modifyUserRole(userId,roleId)>0;
    }
}
